1.2.8.5. alpha.unix.Stream (C)
Check stream handling functions: fopen, tmpfile, fclose, fread, fwrite, fseek, ftell, rewind, fgetpos,fsetpos, clearerr, feof, ferror, fileno.
Examples:
void test() { FILE *p = fopen("foo", "r"); } // warn: opened file is never closed void test() { FILE *p = fopen("foo", "r"); fseek(p, 1, SEEK_SET); // warn: stream pointer might be NULL fclose(p); } void test() { FILE *p = fopen("foo", "r"); if (p) fseek(p, 1, 3); // warn: third arg should be SEEK_SET, SEEK_END, or SEEK_CUR fclose(p); } void test() { FILE *p = fopen("foo", "r"); fclose(p); fclose(p); // warn: already closed } void test() { FILE *p = tmpfile(); ftell(p); // warn: stream pointer might be NULL fclose(p); }